#ifndef ZSTAGECONTROLDOCKWIDGET_H
#define ZSTAGECONTROLDOCKWIDGET_H

#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QDockWidget>
#include "ZControlGroupBox.h"
#include "PositionGroupBox.h"

class ZStageControlDockWidget : public QDockWidget
{
    Q_OBJECT
public:
    ZStageControlDockWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
    void initContent();
    void initConnection();

public slots:
    void zSpeedUp();
    void zSpeedDown();
    void setZPosition(double z);
    void joystick_moveUp();
    void joystick_moveDown();
signals:
    void moveUp(double);
    void moveDown(double);
    void moveUpStop();
    void moveDownStop();
    void stopZ();

    void changeZSpeed(double mmps);

private:
    ZControlGroupBox *zControl;
    PositionGroupBox *xyPosGB;

    QPushButton *pushButtonGoHomeZ;

    QVBoxLayout *goHomeLayout;
    QGroupBox *goHomeGroupBox;

    QHBoxLayout *horizontalLayout;
    QWidget *dockWidget;
    QVBoxLayout *vLayout;
};

#endif // ZSTAGECONTROLDOCKWIDGET_H
